/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.crm.slcm.session;

import java.util.Date;
import java.util.List;
import javax.ejb.Local;
import merlion.common.util.exception.NotExistException;
import merlion.crm.slcm.entity.Customer;
import merlion.crm.slcm.entity.MemberDiscountGroup;
import merlion.crm.slcm.entity.OrderDiscountGroup;
import merlion.crm.slcm.entity.SalesLead;
import merlion.crm.slcm.pojo.Analytics;
import merlion.crm.sopm.entity.ItemLine;
import merlion.frm.bpm.entity.Invoice;
import merlion.frm.ccm.entity.CreditGroup;
import merlion.mrp.ppm.entity.Product;

/**
 *
 * @author Yuwei
 */
@Local
public interface SLCSessionBeanLocal {
    public MemberDiscountGroup getCustomerMemberDiscountGroup(Customer customer);
    public OrderDiscountGroup getOrderDiscountGroup(ItemLine il);
    public Customer getCustomerById(Long id)throws NotExistException;
    public Customer getCustomerByClientId(String customerIdStr)throws NotExistException;
    public SalesLead getSalesLeadById(Long id) throws NotExistException;
    public SalesLead getSalesLeadByClientId(String id) throws NotExistException;
    public SalesLead getClientByClientId(String id) throws NotExistException;
    public SalesLead createSalesLead(SalesLead salesLead);
    public SalesLead getClientById(Long id) throws NotExistException;
    public List<SalesLead> getAllSalesLead();
    public List<SalesLead> getAllClient();
    public SalesLead updateSalesLead(SalesLead salesLead);
    public void removeSalesLead(SalesLead salesLead);
    public Customer createCustomer(Customer customer);
    public List<Customer> getAllCustomer();
    public List<OrderDiscountGroup> getAllOrderDiscountGroup();
    public Customer updateCustomer(Customer customer);
    public OrderDiscountGroup createOrderDiscountGroup(OrderDiscountGroup odg);
    public List<Product> getAllProduct();
    public Product getProductByProductType(String type);
    public Product getProductById(Long id);
    public OrderDiscountGroup getOrderDiscountGroupById(Long id);
    public OrderDiscountGroup updateOrderDiscountGroup(OrderDiscountGroup odg);
    public List<MemberDiscountGroup> getAllMemberDiscountGroup();
    public MemberDiscountGroup createMemberDiscountGroup(MemberDiscountGroup mdg);
    public MemberDiscountGroup getMemberDiscountGroupById(Long id);
    public CreditGroup getCreditGroupbyId(Long id);
    public MemberDiscountGroup updateMemberDiscountGroup(MemberDiscountGroup mdg);
    public String generateClientID();
    public List<CreditGroup> getAllCreditGroup();
    public Customer convertSalesLead(Customer customer, SalesLead salesLead);
    public Product updateProductPrice(Product product);
    public void updateCustomerMemberDiscountGroup(Invoice invoice);
    public List<MemberDiscountGroup> getMemberDiscountGroupByLimitAccSpendingForDs();
    public List<CreditGroup> getCreditGroupByCreditLimit();
    public void deleteOrderDiscountGroup (Long id);
    public String deleteMemberDiscountGroup (Long id);
    public List<Analytics> getAnalyticsClientCategory();
    public List<Analytics> getAnalyticsClientIndustry();
    public List<Analytics> getAnalyticsCustomerCategory();
    public List<Analytics> getAnalyticsCustomerIndustry();
    public List<Analytics> getAnalyticsRegionSales(Date start, Date end);
    public List<Analytics> getAnalyticsProductSales(Date start, Date end);
    public List<Analytics> getAnalyticsIndustrySales(Date start, Date end);
    public Double getMinimumMemberDiscountRate();
    public Double getMaximumMemberDiscountRate();
    public Double getMinimumOrderDiscountRate();
    public Double getMaximumOrderDiscountRate();
    //public void weka();
}